package com.college.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;

@Entity
@Table(name="DEPARTMENT_MASTER")
public class Department {

	private int deptId;
	private int collegeId;
	@NotEmpty @Size(min=2, max=3)
	private String deptName;
	@NotEmpty
	private String collegeName;
	public Department(){
		
	}

	public Department(int deptId, int collegeId, String deptName, String collegeName) {
		super();
		this.deptId = deptId;
		this.collegeId = collegeId;
		this.deptName = deptName;
		this.collegeName = collegeName;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="DEPT_ID")
	public int getDeptId() {
		return deptId;
	}

	public void setDeptId(int deptId) {
		this.deptId = deptId;
	}
	@Column(name="COLLEGE_ID")
	public int getCollegeId() {
		return collegeId;
	}

	public void setCollegeId(int collegeId) {
		this.collegeId = collegeId;
	}
	@Column(name="DEPT_NAME")
	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	@Column(name="COLLEGE_NAME")
	public String getCollegeName() {
		return collegeName;
	}

	public void setCollegeName(String collegeName) {
		this.collegeName = collegeName;
	}
	
	
}

